package com.luych.toolbox.docker.service.sdk;

import com.luych.toolbox.docker.service.sdk.container.DockerContainers;
import com.luych.toolbox.docker.service.sdk.image.DockerImages;
import com.luych.toolbox.docker.service.sdk.network.DockerNetworks;
import com.luych.toolbox.docker.service.sdk.system.DockerSystem;
import com.luych.toolbox.docker.service.sdk.volume.DockerVolumes;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

@Repository
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class DockerClient {

    private final String url;

    public DockerClient(String url) {
        this.url = url;
    }

    public DockerSystem system() {
        return new DockerSystem(url);
    }

    public DockerContainers containers() {
        return new DockerContainers(url);
    }

    public DockerImages images() {
        return new DockerImages(url);
    }

    public DockerNetworks networks() {
        return new DockerNetworks(url);
    }

    public DockerVolumes volumes() {
        return new DockerVolumes(url);
    }
}
